/*
============================================================================
 Name        : BlockSetAP.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBlockSetAP declaration
============================================================================
*/

#ifndef BLOCKSETAP_H
#define BLOCKSETAP_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"
#include "global.h"
// CLASS DECLARATION

class TWlanInfo
{
public:
	enum {NONE, WEAK, LESSWEAK, MIDDLE, MORESTRONG, STRONG};
	TBuf<64> iName;
	TUint8 iSignalRank;
	TWlanInfo():iSignalRank(0xff){}
};

/**
*  CBlockSetAP
* 
*/
class CBlockSetAP :  public CBlock
{
public:
	~CBlockSetAP();

	static CBlockSetAP* NewL(CBaseBlock* bsBack);

	static CBlockSetAP* NewLC(CBaseBlock* bsBack);

public:
	void OnDraw(CFbsBitGc& g) const;

	void OnKeyDown(TInt keyCode);

	void OnMouseUp(const TPoint& aPt);

	void SizeChanged();
	
private:
	void InitAPList();
	void InitAPList2();
	void GetWlanSignal();

private:
	CBlockSetAP(CBaseBlock* bsBack);

	void ConstructL();

protected:
	void AddTabs();

	void BeforeDraw(CFbsBitGc& g) const;

public: // from MTabbarObserver
	void HandleTabbarCommand(TInt aCommand);

private:
	RArray<TIapData> m_APArray;
	RArray<TWlanInfo> m_wlanArray;
	TInt m_nCurrent;
	TInt m_nSelected;
};

#endif // BLOCKSETAP_H
